﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <link rel="stylesheet" href="../assets/css/yui-cssgrids-min.css">
    <link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
    <link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
    <link rel="shortcut icon" type="image/x-icon" href="../assets/favicon.ico">
    <script src="../assets/js/yui-source.js"></script>
	<title>TweenJS v1.0.0 API Documentation : ColorPlugin</title>
</head>
<body class="yui3-skin-sam">

<div id="doc">
    <div id="hd" class="yui3-g header">
        <div class="yui3-u-3-4">
            
                <h1><a href="http://createjs.site/tweenjs"><img src="../assets/docs-icon-TweenJS.png" title="TweenJS"></a></h1>
            
        </div>
        <div class="yui3-u-1-4 version">
            <em>API Documentation for: 1.0.0</em>
        </div>
    </div>
    <div id="bd" class="yui3-g">

        <div class="yui3-u-1-4">
            <div id="docs-sidebar" class="sidebar apidocs">
                <div id="api-list">
    <h2 class="off-left">APIs</h2>
    <div id="api-tabview" class="tabview">
        <ul class="tabs">
            <li><a href="#api-classes">Classes</a></li>
        </ul>

        <div id="api-tabview-filter">
            <input type="search" id="api-filter" placeholder="Type to filter APIs">
        </div>

        <div id="api-tabview-panel">
            <ul id="api-classes" class="apis classes">
            
                <li><a href="AbstractTween.html">AbstractTween</a></li>
            
                <li><a href="ColorPlugin.html">ColorPlugin</a></li>
            
                <li><a href="CSSPlugin.html">CSSPlugin</a></li>
            
                <li><a href="Ease.html">Ease</a></li>
            
                <li><a href="Event.html">Event</a></li>
            
                <li><a href="EventDispatcher.html">EventDispatcher</a></li>
            
                <li><a href="MotionGuidePlugin.html">MotionGuidePlugin</a></li>
            
                <li><a href="RelativePlugin.html">RelativePlugin</a></li>
            
                <li><a href="RotationPlugin.html">RotationPlugin</a></li>
            
                <li><a href="SamplePlugin.html">SamplePlugin</a></li>
            
                <li><a href="Ticker.html">Ticker</a></li>
            
                <li><a href="Timeline.html">Timeline</a></li>
            
                <li><a href="Tween.html">Tween</a></li>
            
                <li><a href="TweenJS.html">TweenJS</a></li>
            
                <li><a href="Utility%20Methods.html">Utility Methods</a></li>
            
            </ul>

            <ul id="api-modules" class="apis modules">
            
                <li><a href="../modules/CreateJS.html">CreateJS</a></li>
            
                <li><a href="../modules/EaselJS.html">EaselJS</a></li>
            
                <li><a href="../modules/TweenJS.html">TweenJS</a></li>
            
            </ul>
        </div>
    </div>
</div>

            </div>
        </div>
        <div class="yui3-u-3-4">
            <div id="api-options">
        Show:
        <label for="api-show-inherited">
            <input type="checkbox" id="api-show-inherited" checked="">
            Inherited
        </label>

        <label for="api-show-protected">
            <input type="checkbox" id="api-show-protected">
            Protected
        </label>

        <label for="api-show-private">
            <input type="checkbox" id="api-show-private">
            Private
        </label>
        <label for="api-show-deprecated">
            <input type="checkbox" id="api-show-deprecated">
            Deprecated
        </label>

    </div>
            <div class="apidocs">
                <div id="docs-main">
                    <div class="content">
                        <h1>ColorPlugin Class</h1>
<div class="box meta">
    

    

    
        <div class="foundat">
            Defined in: <a href="../files/tweenjs_plugins_ColorPlugin.js.html#l38"><code>ColorPlugin:38</code></a>
        </div>
    

    
        
            Module: <a href="../modules/TweenJS.html">TweenJS</a>
        
    

    
</div>



<div class="box intro">
    <p>The ColorPlugin enables tweening of almost any CSS color values. This includes 3 or 6 digit hex colors (<code>#00FF00</code>),
rgb, rgba, hsl, and hsla colors (but not named colors, such as <code>red</code>).</p>
<p>It can operate in either <code>rgb</code> or <code>hsl</code> mode. It will convert all colors into that mode, and output them accordingly.</p>

</div>


    <div class="constructor">
        <h2>Constructor</h2>
        <div id="method_ColorPlugin" class="method item">
    <h3 class="name"><code>ColorPlugin</code></h3>

    
        <span class="paren">()</span>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/tweenjs_plugins_ColorPlugin.js.html#l38"><code>ColorPlugin:38</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        
    </div>

    

    

    
</div>

    </div>


<div id="classdocs" class="tabview">
    <ul class="api-class-tabs">
        <li class="api-class-tab index"><a href="#index">Index</a></li>

        
            <li class="api-class-tab methods"><a href="#methods">Methods</a></li>
        
        
            <li class="api-class-tab properties"><a href="#properties">Properties</a></li>
        
        
        
    </ul>

    <div>
        <div id="index" class="api-class-tabpanel index">
            <h2 class="off-left">Item Index</h2>

            
                <div class="index-section methods">
                    <h3>Methods</h3>

                    <ul class="index-list methods">
                        
                            <li class="index-item method">
                                <a href="#method_change">change</a>

                                
                                    <span class="flag static">static</span>
                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_init">init</a>

                                
                                    <span class="flag static">static</span>
                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_install">install</a>

                                
                                    <span class="flag static">static</span>
                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_step">step</a>

                                
                                    <span class="flag static">static</span>
                                
                                
                            </li>
                        
                    </ul>
                </div>
            

            
                <div class="index-section properties">
                    <h3>Properties</h3>

                    <ul class="index-list properties">
                        
                            <li class="index-item property protected">
                                <a href="#property__mode">_mode</a>

                                
                                    <span class="flag static">static</span>
                                
                                
                            </li>
                        
                            <li class="index-item property">
                                <a href="#property_COLOR_RE">COLOR_RE</a>

                                
                                    <span class="flag static">static</span>
                                
                                
                            </li>
                        
                            <li class="index-item property">
                                <a href="#property_HEX_RE">HEX_RE</a>

                                
                                    <span class="flag static">static</span>
                                
                                
                            </li>
                        
                            <li class="index-item property">
                                <a href="#property_ID">ID</a>

                                
                                    <span class="flag static">static</span>
                                
                                
                            </li>
                        
                            <li class="index-item property">
                                <a href="#property_RGB_HSL_RE">RGB_HSL_RE</a>

                                
                                    <span class="flag static">static</span>
                                
                                
                            </li>
                        
                    </ul>
                </div>
            

            

            
        </div>

        
            <div id="methods" class="api-class-tabpanel">
                <h2 class="off-left">Methods</h2>

                
                    <div id="method_change" class="method item">
    <h3 class="name"><code>change</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>tween</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code>step</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code>prop</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code>value</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code>ratio</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code>end</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    
        <span class="returns-inline">
            <span class="type">Any</span>
        </span>
    

    

    

    

    
        <span class="flag static">static</span>
    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/tweenjs_plugins_ColorPlugin.js.html#l147"><code>change:147</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Called before a property is updated by the tween.
See <a href="SamplePlugin.html#method_change" class="crosslink">change</a> for more info.</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">tween</code>
                        <span class="type"><a href="Tween.html" class="crosslink">Tween</a></span>
                    

                    

                    <div class="param-description">
                         
                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name">step</code>
                        <span class="type">TweenStep</span>
                    

                    

                    <div class="param-description">
                         
                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name">prop</code>
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
                    

                    

                    <div class="param-description">
                         
                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name">value</code>
                        <span class="type">Any</span>
                    

                    

                    <div class="param-description">
                         
                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name">ratio</code>
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
                    

                    

                    <div class="param-description">
                         
                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name">end</code>
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>
                    

                    

                    <div class="param-description">
                         
                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    
        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                
                    
                        <span class="type">Any</span>:
                    
                
            </div>
        </div>
    

    
</div>

                
                    <div id="method_init" class="method item">
    <h3 class="name"><code>init</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>tween</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code>prop</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code>value</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    
        <span class="returns-inline">
            <span class="type">Any</span>
        </span>
    

    

    

    

    
        <span class="flag static">static</span>
    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/tweenjs_plugins_ColorPlugin.js.html#l109"><code>init:109</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Called by TweenJS when a new property initializes on a tween.
See <a href="SamplePlugin.html#method_init" class="crosslink">init</a> for more info.</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">tween</code>
                        <span class="type"><a href="Tween.html" class="crosslink">Tween</a></span>
                    

                    

                    <div class="param-description">
                         
                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name">prop</code>
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
                    

                    

                    <div class="param-description">
                         
                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name">value</code>
                        <span class="type">Any</span>
                    

                    

                    <div class="param-description">
                         
                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    
        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                
                    
                        <span class="type">Any</span>:
                    
                
            </div>
        </div>
    

    
</div>

                
                    <div id="method_install" class="method item">
    <h3 class="name"><code>install</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>mode</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    
        <span class="flag static">static</span>
    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/tweenjs_plugins_ColorPlugin.js.html#l97"><code>install:97</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Installs this plugin for use with TweenJS. Call this once after TweenJS is loaded to enable this plugin.</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">mode</code>
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
                    

                    

                    <div class="param-description">
                        <p>A string equalling either "rgb" or "hsl" indicating what color mode should be used for calculations
and output. You can input any color type regardless of the mode setting.</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
</div>

                
                    <div id="method_step" class="method item">
    <h3 class="name"><code>step</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>tween</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code>step</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code>props</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    
        <span class="flag static">static</span>
    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/tweenjs_plugins_ColorPlugin.js.html#l130"><code>step:130</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Called when a new step is added to a tween (ie. a new "to" action is added to a tween).
See <a href="SamplePlugin.html#method_step" class="crosslink">step</a> for more info.</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">tween</code>
                        <span class="type"><a href="Tween.html" class="crosslink">Tween</a></span>
                    

                    

                    <div class="param-description">
                         
                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name">step</code>
                        <span class="type">TweenStep</span>
                    

                    

                    <div class="param-description">
                         
                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name">props</code>
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>
                    

                    

                    <div class="param-description">
                         
                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
</div>

                
            </div>
        

        
            <div id="properties" class="api-class-tabpanel">
                <h2 class="off-left">Properties</h2>

                
                    <div id="property__mode" class="property item protected">
    <h3 class="name"><code>_mode</code></h3>
    <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>

    

    
        <span class="flag protected">protected</span>
    

    

    
        <span class="flag static">static</span>
    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/tweenjs_plugins_ColorPlugin.js.html#l79"><code>_mode:79</code></a>
        
        </p>

        

        
    </div>

    <div class="description">
        
    </div>

    
        <p><strong>Default:</strong> rgb</p>
    

    

    
</div>

                
                    <div id="property_COLOR_RE" class="property item">
    <h3 class="name"><code>COLOR_RE</code></h3>
    <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/RegExp" class="crosslink external" target="_blank">RegExp</a></span>

    

    

    

    
        <span class="flag static">static</span>
    

    
        <span class="flag readonly">readonly</span>
    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/tweenjs_plugins_ColorPlugin.js.html#l52"><code>COLOR_RE:52</code></a>
        
        </p>

        

        
    </div>

    <div class="description">
        <p>READ-ONLY. RegExp pattern that detects CSS color values.</p>

    </div>

    

    

    
</div>

                
                    <div id="property_HEX_RE" class="property item">
    <h3 class="name"><code>HEX_RE</code></h3>
    <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/RegExp" class="crosslink external" target="_blank">RegExp</a></span>

    

    

    

    
        <span class="flag static">static</span>
    

    
        <span class="flag readonly">readonly</span>
    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/tweenjs_plugins_ColorPlugin.js.html#l70"><code>HEX_RE:70</code></a>
        
        </p>

        

        
    </div>

    <div class="description">
        <p>READ-ONLY. RegExp pattern that matches a 3 or 6 digit RGB string with a preceding #.</p>

    </div>

    

    

    
</div>

                
                    <div id="property_ID" class="property item">
    <h3 class="name"><code>ID</code></h3>
    <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>

    

    

    

    
        <span class="flag static">static</span>
    

    
        <span class="flag readonly">readonly</span>
    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/tweenjs_plugins_ColorPlugin.js.html#l88"><code>ID:88</code></a>
        
        </p>

        

        
    </div>

    <div class="description">
        <p>READ-ONLY. A unique identifying string for this plugin. Used by TweenJS to ensure duplicate plugins are not installed on a tween.</p>

    </div>

    

    

    
</div>

                
                    <div id="property_RGB_HSL_RE" class="property item">
    <h3 class="name"><code>RGB_HSL_RE</code></h3>
    <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/RegExp" class="crosslink external" target="_blank">RegExp</a></span>

    

    

    

    
        <span class="flag static">static</span>
    

    
        <span class="flag readonly">readonly</span>
    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/tweenjs_plugins_ColorPlugin.js.html#l61"><code>RGB_HSL_RE:61</code></a>
        
        </p>

        

        
    </div>

    <div class="description">
        <p>READ-ONLY. RegExp pattern that matches rgb or hsl color strings, with groups for each value.</p>

    </div>

    

    

    
</div>

                
            </div>
        

        

        
    </div>
</div>

                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="../assets/vendor/prettify/prettify-min.js"></script>
<script>prettyPrint();</script>
<script src="../assets/js/yui-prettify.js"></script>
<script src="../api.js"></script>
<script src="../assets/js/api-filter.js"></script>
<script src="../assets/js/api-list.js"></script>
<script src="../assets/js/api-search.js"></script>
<script src="../assets/js/apidocs.js"></script>
</body>
</html>
